
<?php
include("db/connect.php");
$selectprovince="SELECT * FROM product ORDER BY pro_name ASC";
?>

<script>
	function submitPro(){
		alert();
	$.ajax({
			type:"POST",
			url:"insert_product2.php",
			data:$("#fromInsert_Pro").serialize(),
			success: function(msg){
				$("#spantest").html(msg);
				}
			});//ajax
	}//function submit   

</script>
<style type="text/css">
#fromInsert_Pro p {
	text-align: center;
	font-size: 36px;
}
</style>

<form id="fromInsert_Pro" name="fromInsert_Pro" method="post" action="Javascript:submitPro();">
  <p>ข้อมูลสินค้า</p>
  <table width="528" border="0">
    <tr>
      <td width="178">รหัสสินค้า</td>
      <td width="340"><input type="text" name="pro_id" id="pro_id" /></td>
    </tr>
    <tr>
      <td>ชื่อสินค้า</td>
      <td>
      <input name="pro_name" type="text" required="required" id="pro_name" maxlength="13"/></td>
    </tr>
    <tr>
      <td>ราคา</td>
      <td>
      <input name="pro_price" type="text" id="pro_price" /></td>
    </tr>
    <tr>
      <td>รายละเอียดสินค้า</td>
      <td><textarea name="pro_detail" cols="30" rows="5" id="pro_detail"></textarea></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="Submit" id="button" value="Submit" />
    <input type="reset" name="button2" id="button2" value="Reset" />
  </p>
  <p>&nbsp;</p>
</form>
<div id="spantest"></div>

